#ifndef CGUISTYLE_H_
#define CGUISTYLE_H_

#include "cborder.h"

/**
 * CGuiStyle - class with graphical style of gui component
 * @author Michal Rost
 * @date 10.06.2008
 */
class CGuiStyle : public CObject {
public:
  CGuiStyle() {
    border = CBorder(1, CColor(0x000000), 255);
    color = CColor(0xffffff);
    alpha = 255;
    imgId = -1;
  }
  CGuiStyle(CBorder border, CColor color, unsigned char alpha, int imgId = -1) {
    this->border = border;
    this->color = color;
    this->alpha = alpha;
    this->imgId = imgId;
  }
  void setImgId(int imgId) {
    this->imgId = imgId;
  }
  void setBorder(CBorder border) {
    this->border = border;
  }
  void setColor(CColor color) {
    this->color = color;
  }
  void setAlpha(unsigned char alpha) {
    this->alpha = alpha;
  }
  int getImgId() const {
    return imgId;
  }
  CBorder getBorder() const {
    return border;
  }
  CColor getColor() const {
    return color;
  }
  unsigned char getAlpha() const {
    return alpha;
  }
  string toString() {
    string str = "alpha = " + CMath<short>::toString((short) alpha) + "\n";
    str += "color = " + color.toString() + "\n";
    str += "imgId = " + CMath<int>::toString(imgId) + "\n";
    str += "border = {\n" + border.toString() + "}\n";
    return str;
  }
  static string getClassName() {
    return "CGuiStyle";
  }
protected:
  int imgId;
  CBorder border;
  CColor color;
  unsigned char alpha;
};

#endif
